//
//  ContentView.swift
//  Landmarks
//
//  Created by 温哲 on 2021/2/10.
//

import SwiftUI

struct ContentView: View {
    @State private var selection: Tab = .featured
    enum Tab {
        case featured
        case list
        case dynamic
        case vipbuy
        case mine
    }

    var body: some View {
        TabView(selection: $selection) {
            CategoryHome().tabItem { Label("Featured", systemImage: "star") }.tag(Tab.featured)

            LandmarkList().tabItem { Label("List", systemImage: "list.bullet") }.tag(Tab.list)

            BiliDynamic().tabItem { Label("Dynamic", systemImage: "square.and.pencil") }.tag(Tab.dynamic)

            BiliVipBuy().tabItem { Label("Vipbuy", systemImage: "cart") }.tag(Tab.vipbuy)

            BiliMine().tabItem { Label("Mine", systemImage: "person") }.tag(Tab.mine)
        }
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView().environmentObject(ModelData())
    }
}
